import axios from '@/libs/api.request'

export class EmployeesApi {
  static get (path, params = {}) {
    return request.get(path, createGETParams(params))
  }

  static post (path, params = {}) {
    return request.post(path, params)
  }

  // 获取员工花名册列表
  static getEmployeeListNew (params) {
    return axios.request({
      url: '/Employee/GetEmployeeListNew',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除员工
  static deleteEmployee (params) {
    return axios.request({
      url: '/Employee/DeleteEmployee',
      method: 'DELETE',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 获取离职信息列表
  static getResignInfoList (params) {
    return axios.request({
      url: '/Employee/GetResignInfoList',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 添加或修改离职信息
  static postResignInfo (params) {
    return axios.request({
      url: '/Employee/PostResignInfo',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取单个员工基本信息
  static getEmployee (params) {
    return axios.request({
      url: '/Employee/GetEmployee',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 添加或修改员工信息
  static postEmployee (params) {
    return axios.request({
      url: '/Employee/PostEmployee',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 批量修改员工信息
  static batchUpdateEmployees (params) {
    return axios.request({
      url: '/Employee/BatchUpdateEmployees',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 员工附件上传
  static postUpload (id, params) {
    return axios.request({
      url: '/Employee/' + id + '/Upload',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取员工附件列表
  static getAttachmentList (params) {
    return axios.request({
      url: '/Employee/GetAttachmentList',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 添加或者修改员工合同
  static postContract (params) {
    return axios.request({
      url: '/Employee/PostContract',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除员工合同
  static deleteContract (params) {
    return axios.request({
      url: '/Employee/DeleteContract',
      method: 'delete',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 删除员工合同附件
  static deleteEmpAtta (params) {
    return axios.request({
      url: '/Employee/DeleteEmpAtta',
      method: 'delete',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 删除员工照片附件
  static deleteEmpPic (params) {
    return axios.request({
      url: '/Employee/DeleteEmpPic',
      method: 'delete',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 获取员工合同列表
  static getContract (params) {
    return axios.request({
      url: '/Employee/GetContract',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 添加或者修改员工参保信息
  static postInsuranceInfo (params) {
    return axios.request({
      url: '/Employee/PostInsuranceInfo',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取员工参保信息
  static getInsuranceInfoList (params) {
    return axios.request({
      url: '/Employee/GetInsuranceInfoList',
      method: 'post',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 离职
  static employeeDimission (params) {
    return axios.request({
      url: '/Employee/EmployeeDimission',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出员工数据
  static exportEmployees (params) {
    return axios.request({
      url: '/Employee/ExportEmployees',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 下载员工附件
  static downloadFile (params) {
    return axios.request({
      url: '/Employee/DownloadFile',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 批量下载员工照片数据
  static downloadPictureFile (params) {
    return axios.request({
      url: '/Employee/DownloadPictureFile',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 获取参保人员
  static getInCommercial (params) {
    return axios.request({
      url: '/Employee/GetInCommercial',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取被替换人员
  static getOutCommercial (params) {
    return axios.request({
      url: '/Employee/GetOutCommercial',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 商保替换前验证
  static checkCommercialChange (params) {
    return axios.request({
      url: '/Employee/CheckCommercialChange',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 商保替换
  static empCommercialChange (params) {
    return axios.request({
      url: '/Employee/EmpCommercialChange',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 员工调动校验
  static checkEmployeeTransfer (params) {
    return axios.request({
      url: '/Employee/CheckEmployeeTransfer',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 员工调动校验
  static checkEmployeeTransfer (params) {
    return axios.request({
      url: '/Employee/CheckEmployeeTransfer',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取调动的所有公司
  static getEmployeeTransferAllCompanys (params) {
    return axios.request({
      url: '/Employee/GetEmployeeTransferAllCompanys',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 获取调动的所有公司2
  static getTransferAllCompanysList (params) {
    return axios.request({
      url: '/Employee/GetTransferAllCompanysList',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 员工调动保存
  static postEmployeeTransfer (params) {
    return axios.request({
      url: '/Employee/PostEmployeeTransfer',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 批量下载员工照片数据
  static downloadPictureFile (params) {
    return axios.request({
      url: '/Employee/DownloadPictureFile',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取修改字段下拉框
  static getFiledList (params) {
    return axios.request({
      url: '/Employee/GetFiledList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
